translate "bug"? - Mailing list pgsql-general

From lynch@lscorp.com (Richard Lynch)
Subject translate "bug"?
Date
Msg-id v02140b1db1c7044884e2@[207.152.64.133]
Whole thread Raw
List pgsql-general
I have some embedded spaces in data that should be stripped out.

In the course of trying to find a way to do this, I found out some stuff:

#1a
\df would be a whole lot nicer if I could do:

\df <type>    and get only functions that have the given return type, or
\df <string>  it grepped all the lines for something matching string

Wouldn't have to be regexp or anything fancy, just something to shorten the
list a mite.

#1a
\df would be a whole lot nicer if it didn't truncate the description. :-(
Or if the descriptions of long_function_names didn't start off
long_function_name blah, bl [cut!]

#2
select foo, translate(foo, ' ', '') from blah where foo ~* ' ';
doesn't work, because 'man 3 oracle_compat' sez:

TRANSLATE(string, from, to)
Returns string after replacing all occurences of from with the
corresponding character in to.  TRANSLATE will not remove characters.

However, the way it breaks when I did this seemed odd to me.  Rather than
bitching about '', it chops off everything after (and presumably including)
the first space...  It would be nicer if it would do something... nicer.
:-)

#3
If there is an easier way than concat(substr(foo, 0, position(foo, ' ')),
substr(foo, position(foo, ' ') + 1)) it's pretty hard to find...

--
--
-- "TANSTAAFL" Rich lynch@lscorp.com



pgsql-general by date:

Previous
From: Summer
Date:
Subject: libpq++ library
Next
From: Bruce Taylor
Date:
Subject: Interesting URLs?